﻿
namespace Scoreboard.Model
{
	using System;
	using System.Collections.Generic;
	using System.ComponentModel;
	using System.ComponentModel.DataAnnotations;
	using System.Data.Objects.DataClasses;
	using System.Linq;
	using System.ServiceModel.DomainServices.Hosting;
	using System.ServiceModel.DomainServices.Server;


	// The MetadataTypeAttribute identifies GameMetadata as the class
	// that carries additional metadata for the Game class.
	[MetadataTypeAttribute(typeof(Game.GameMetadata))]
	public partial class Game
	{

		// This class allows you to attach custom attributes to properties
		// of the Game class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class GameMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private GameMetadata()
			{
			}

			public DateTime Date { get; set; }

			public Group Group { get; set; }

			public Nullable<int> GroupId { get; set; }

			public int Id { get; set; }

			[Include]
			public Participant Opponent { get; set; }

			public byte OpponentScore { get; set; }

			[Include]
			public Participant Participant { get; set; }

			public int ParticipantId { get; set; }

			public int ParticipantId1 { get; set; }

			public byte ParticipantScore { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies GroupMetadata as the class
	// that carries additional metadata for the Group class.
	[MetadataTypeAttribute(typeof(Group.GroupMetadata))]
	public partial class Group
	{

		// This class allows you to attach custom attributes to properties
		// of the Group class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class GroupMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private GroupMetadata()
			{
			}

			[Include]
			public EntityCollection<Game> Games { get; set; }

			public int Id { get; set; }

			[Include]
			public EntityCollection<Participant> Participants { get; set; }

			public Stage Stage { get; set; }

			public int StageId { get; set; }

			public string Tag { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies ParticipantMetadata as the class
	// that carries additional metadata for the Participant class.
	[MetadataTypeAttribute(typeof(Participant.ParticipantMetadata))]
	public partial class Participant
	{

		// This class allows you to attach custom attributes to properties
		// of the Participant class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class ParticipantMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private ParticipantMetadata()
			{
			}

			public EntityCollection<Game> GamesAsOpponent { get; set; }

			public EntityCollection<Game> GamesAsParticipant { get; set; }

			public Group Group { get; set; }

			public Nullable<int> GroupId { get; set; }

			public int Id { get; set; }

			[Include]
			public User Mate { get; set; }

			[Include]
			public User Player { get; set; }

			public Tournament Tournament { get; set; }

			public Nullable<int> TournamentId { get; set; }

			public int UserId { get; set; }

			public Nullable<int> UserId1 { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies RoleMetadata as the class
	// that carries additional metadata for the Role class.
	[MetadataTypeAttribute(typeof(Role.RoleMetadata))]
	public partial class Role
	{

		// This class allows you to attach custom attributes to properties
		// of the Role class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class RoleMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private RoleMetadata()
			{
			}

			public int Id { get; set; }

			public string Name { get; set; }

			public EntityCollection<User> Users { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies StageMetadata as the class
	// that carries additional metadata for the Stage class.
	[MetadataTypeAttribute(typeof(Stage.StageMetadata))]
	public partial class Stage
	{

		// This class allows you to attach custom attributes to properties
		// of the Stage class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class StageMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private StageMetadata()
			{
			}

			public SubTournament ContainerSubTournament { get; set; }

			[Include]
			public EntityCollection<Group> Groups { get; set; }

			public int Id { get; set; }

			public int IndexNumber { get; set; }

			public bool IsFinished { get; set; }

			public Nullable<int> SubTournamentId { get; set; }

			[Include]
			public EntityCollection<SubTournament> SubTournaments { get; set; }

			public Tournament Tournament { get; set; }

			public int TournamentId { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies SubTournamentMetadata as the class
	// that carries additional metadata for the SubTournament class.
	[MetadataTypeAttribute(typeof(SubTournament.SubTournamentMetadata))]
	public partial class SubTournament
	{

		// This class allows you to attach custom attributes to properties
		// of the SubTournament class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class SubTournamentMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private SubTournamentMetadata()
			{
			}

			public Stage ContainerStage { get; set; }

			public int Id { get; set; }

			public int IndexNumber { get; set; }

			public string Name { get; set; }

			public int StageId { get; set; }

			[Include]
			public EntityCollection<Stage> Stages { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies TournamentMetadata as the class
	// that carries additional metadata for the Tournament class.
	[MetadataTypeAttribute(typeof(Tournament.TournamentMetadata))]
	public partial class Tournament
	{

		// This class allows you to attach custom attributes to properties
		// of the Tournament class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class TournamentMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private TournamentMetadata()
			{
			}

			public Nullable<DateTime> DateFinished { get; set; }

			public Nullable<DateTime> DateStarted { get; set; }

			public int Id { get; set; }

			public bool IsFinished { get; set; }

			public bool IsForDoubles { get; set; }

			public string Name { get; set; }

			[Include]
			public EntityCollection<Participant> Participants { get; set; }

			[Include]
			public EntityCollection<Stage> Stages { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies UserMetadata as the class
	// that carries additional metadata for the User class.
	[MetadataTypeAttribute(typeof(User.UserMetadata))]
	public partial class User
	{

		// This class allows you to attach custom attributes to properties
		// of the User class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class UserMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private UserMetadata()
			{
			}

			public string FriendlyName { get; set; }

			public int Id { get; set; }

			public string Login { get; set; }

			public EntityCollection<Participant> MateParticipants { get; set; }

			public EntityCollection<Participant> Participants { get; set; }

			public int RatingGames { get; set; }

			public int RatingValue { get; set; }
			
			public EntityCollection<Role> Roles { get; set; }

			public string PhotoUrl { get; set; }

			public string Skype { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies ScriptMetadata as the class
	// that carries additional metadata for the Script class.
	[MetadataTypeAttribute(typeof(Script.ScriptMetadata))]
	public partial class Script
	{

		// This class allows you to attach custom attributes to properties
		// of the Script class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class ScriptMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private ScriptMetadata()
			{
			}

			public int Id { get; set; }

			public string Name { get; set; }

			public string Text { get; set; }
		}
	}


	// The MetadataTypeAttribute identifies PeaceOfNewsMetadata as the class
	// that carries additional metadata for the PeaceOfNews class.
	[MetadataTypeAttribute(typeof(PeaceOfNews.PeaceOfNewsMetadata))]
	public partial class PeaceOfNews
	{

		// This class allows you to attach custom attributes to properties
		// of the PeaceOfNews class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class PeaceOfNewsMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private PeaceOfNewsMetadata()
			{
			}

			[Include]
			public User Author { get; set; }

			public DateTime Date { get; set; }

			public int Id { get; set; }

			public string Text { get; set; }

			public int UserId { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies PlaygroundMetadata as the class
	// that carries additional metadata for the Playground class.
	[MetadataTypeAttribute(typeof(Playground.PlaygroundMetadata))]
	public partial class Playground
	{

		// This class allows you to attach custom attributes to properties
		// of the Playground class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class PlaygroundMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private PlaygroundMetadata()
			{
			}

			public int Id { get; set; }

			public bool IsAvailable { get; set; }

			public string Name { get; set; }

			public string PhotoUrl { get; set; }

			public int Capacity { get; set; }

			[Include]
			public EntityCollection<PlaygroundLease> PlaygroundLeases { get; set; }
		}
	}

	// The MetadataTypeAttribute identifies PlaygroundLeaseMetadata as the class
	// that carries additional metadata for the PlaygroundLease class.
	[MetadataTypeAttribute(typeof(PlaygroundLease.PlaygroundLeaseMetadata))]
	public partial class PlaygroundLease
	{

		// This class allows you to attach custom attributes to properties
		// of the PlaygroundLease class.
		//
		// For example, the following marks the Xyz property as a
		// required property and specifies the format for valid values:
		//    [Required]
		//    [RegularExpression("[A-Z][A-Za-z0-9]*")]
		//    [StringLength(32)]
		//    public string Xyz { get; set; }
		internal sealed class PlaygroundLeaseMetadata
		{

			// Metadata classes are not meant to be instantiated.
			private PlaygroundLeaseMetadata()
			{
			}

			[Include]
			public User Creator { get; set; }

			public int DurationMinutes { get; set; }

			public int Id { get; set; }

			[Include]
			public Participant Opponent { get; set; }

			[Include]
			public Participant Participant { get; set; }

			public int ParticipantId { get; set; }

			public int ParticipantId1 { get; set; }

			[Include]
			public Playground Playground { get; set; }

			public int PlaygroundId { get; set; }

			public DateTime StartTime { get; set; }

			public int UserId { get; set; }
		}
	}
}
